﻿@page "/file-form"
@using Dignite.FileExplorer.Blazor.Pages.FileExplorer
@using Dignite.FileExplorer.Files;
@inject IFileDescriptorAppService FileDescriptorAppService
@inherits FileExplorerSampleComponentBase
<div class="container">
    <Row>
        <Column>
            <Card>
                <CardHeader>
                    Send file stream with form
                </CardHeader>
                <CardBody>
                    <FileEditComponent ContainerName="@(FileExplorerSample.Services.SampleContainer.SampleContainerName)" CellName="cell1" Multiple="true" EntityId="7c804a75-665c-c575-13e5-3a07b0bbb0fe">
                    </FileEditComponent>
                </CardBody>
            </Card>
        </Column>
        <Column>
            <Card>
                <CardHeader>
                    Select uploaded files
                </CardHeader>
                <CardBody>
                    <FilePickerComponent ContainerName="@(FileExplorerSample.Services.SampleContainer.SampleContainerName)" CellName="cell1" Multiple="true" EntityId="@EntityId" @bind-FileDescriptors="@Files">
                    </FilePickerComponent>
                    <hr />
                    <h5>
                        Selected Files
                    </h5>
                    @if (Files != null)
                    {
                        @foreach (var file in Files)
                        {
                            <p>
                                @file.Name
                            </p>
                        }
                    }
                </CardBody>
            </Card>
        </Column>
    </Row>
</div>
